/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.thieunv.btvn1;

import java.util.Scanner;

/**
 *
 * @author Leo
 */
public class Bai1_Muc_NguyenTo {
    public static void main(String[] args) {
        System.out.print("Nhap so nguyen n: ");
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        System.out.println(isPrime(n)?n + " la so nguyen to!":n + " n khong phai so nguyen to!");
    }
    
    public static boolean isPrime(long n){
        if(n<2)
            return false;
        long sqrt = (long)Math.sqrt(n);
        for(int i=2;i<=sqrt;i++){
            if(n%i==0)
                return false;
        }
        return true;
    }
}
